/**
*      author: Y_Yao
*      created: 2025-04-12 20:49:20
**/

#include<bits/stdc++.h>

#define int LL
using namespace std;
using LL = long long;
const LL LLINF = 9e18;
const int INF = 0x3f3f3f3f;
string s;
int k,n;

void solve()
{
    cin >> n >> k;
    cin >> s;
    string t = " " + s;
    s = " " + s + " ";
    for(int i = 1;i <= n + 1;i++)
    {
        if(s[i] == '.') t[i] = '.';
        else if(s[i] == 'o')
        {
            t[i] = 'o';
            k--;
        }
        else if(s[i] == '?')
        {
            if(s[i-1] == 'o' || s[i+1] == 'o')
            {
                s[i] = t[i] = '.';
            }
        }
    }

    if(k == 0)
    {
        for(int i = 1;i <= n;i++)
        {
            if(s[i] == '?') t[i] = '.';
        }
    }
    else
    {
        int mx = 0,l = 0;
        for(int i = 1;i <= n + 1;i++)
        {
            if(s[i] == '?') l++;
            else
            {
                mx += (l + 1) / 2;
                l = 0;
            }
        }
        if(mx == k)
        {
            l = 0;
            for(int i = 1;i <= n + 1;i++)
            {
                if(s[i] == '?') l++;
                else
                {
                    if(l & 1)
                    {
                        for(int j = 1;j <= l;j++)
                        {
                            t[i - j] = ".o"[j & 1];
                        }
                    }
                    else
                    {
                        for(int j = 1;j <= l;j++)
                        {
                            t[i - j] = '?';
                        }
                    }
                    l = 0;
                }
            }
        }
        else
        {
            for(int i = 1;i <= n;i++)
            {
                if(s[i] == '?') t[i] = '?';
            }
        }
    }
    for(int i = 1;i <= n;i++) cout << t[i];
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int t = 1;
    // cin >> t;
    while(t--)
    {
        solve();
    }
    return 0;
}